import request from "@/request/request";

// 获取菜单列表
export function getMenuList(data) {
    return request({
        method: "post",
        url: "/manpower/menu/list",
        data: data
    })
}

// 添加菜单
export function addMenu(data) {
    return request({
        method: "post",
        url: "/manpower/menu/add",
        data: data
    })
}

// 更新菜单
export function updateMenu(data) {
    return request({
        method: "post",
        url: "/manpower/menu/update",
        data: data
    })
}

// 删除菜单
export function deleteMenu(id) {
    return request({
        method: "post",
        url: "/manpower/menu/delete",
        params: { id: id }
    })
}

// 根据ID获取菜单
export function getMenuById(id) {
    return request({
        method: "post",
        url: "/manpower/menu/getById",
        params: { id: id }
    })
}

// 获取菜单树
export function getMenuTree() {
    return request({
        method: "post",
        url: "/manpower/menu/getMenuTree"
    })
}

// 获取所有菜单
export function getAllMenus() {
    return request({
        method: "post",
        url: "/manpower/menu/getAll"
    })
} 